home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / csarun.z / csarun
Encoding:
Text File  |  2001-04-17  |  16.8 KB  |  265 lines

  1.  
  2.  
  3.  
  4. ccccssssaaaarrrruuuunnnn((((1111MMMM))))                                                          ccccssssaaaarrrruuuunnnn((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      csarun - processes the daily accounting files and generates reports
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_aaaa_cccc_cccc_tttt_////_cccc_ssss_aaaa_rrrr_uuuu_nnnn [_----_AAAA] [_----_VVVV _l_e_v_e_l] [_M_M_D_D [_h_h_m_m [_s_t_a_t_e]]]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      The _cccc_ssss_aaaa_rrrr_uuuu_nnnn command, usually initiated by _cccc_rrrr_oooo_nnnn(1M), directs the processing
  16.      of the daily accounting files.  _cccc_ssss_aaaa_rrrr_uuuu_nnnn processes accounting records
  17.      written into the _p_a_c_c_t file.
  18.  
  19.      If errors occur, _cccc_ssss_aaaa_rrrr_uuuu_nnnn does not damage the active accounting file.  It
  20.      records its progress by writing descriptive diagnostic messages to the
  21.      _aaaa_cccc_tttt_iiii_vvvv_eeee file.  When an error is detected, a message is written to the
  22.      SYSLOG file, and mail is sent to _rrrr_oooo_oooo_tttt and _aaaa_dddd_mmmm.  Further data processing
  23.      is halted.
  24.  
  25.      Before invoking _cccc_ssss_aaaa_rrrr_uuuu_nnnn on a new accounting period, ensure that the
  26.      previous invocation of _cccc_ssss_aaaa_rrrr_uuuu_nnnn has completed successfully.  If this is not
  27.      done, information about unfinished jobs will not be accurate.
  28.  
  29.      The _llll_oooo_cccc_kkkk and _llll_oooo_cccc_kkkk_1111 files are used to protect against simultaneous
  30.      invocation.
  31.  
  32.      The _cccc_ssss_aaaa_rrrr_uuuu_nnnn command accepts the following options and operands:
  33.  
  34.      _----_AAAA        Accounts for both terminated and active jobs.  By default, only
  35.                terminated jobs are reported.  _cccc_ssss_aaaa_rrrr_uuuu_nnnn does not recycle active
  36.                jobs when this option is specified.
  37.  
  38.      _----_VVVV _l_e_v_e_l  Controls verification level of accounting data files.
  39.  
  40.      _M_M_D_D [_h_h_m_m [_s_t_a_t_e]]
  41.                Sets month, day, hour, minute, and state for which _cccc_ssss_aaaa_rrrr_uuuu_nnnn will
  42.                rerun the accounting.  If _cccc_ssss_aaaa_rrrr_uuuu_nnnn is restarted, the month and
  43.                day are necessary; other portions are optional.  If you supply
  44.                the _s_t_a_t_e on the command line, you must also specify _h_h_m_m.
  45.  
  46.      The _cccc_ssss_aaaa_rrrr_uuuu_nnnn command breaks its processing into separate, restartable
  47.      states using _ssss_tttt_aaaa_tttt_eeee_ffff_iiii_llll_eeee to remember the last state completed.  It
  48.      accomplishes this by writing the state name into _ssss_tttt_aaaa_tttt_eeee_ffff_iiii_llll_eeee.  _cccc_ssss_aaaa_rrrr_uuuu_nnnn looks
  49.      in _ssss_tttt_aaaa_tttt_eeee_ffff_iiii_llll_eeee to determine what must be processed next.  The states are
  50.      executed in the following order:
  51.  
  52.      SSSSttttaaaatttteeee NNNNaaaammmmeeee     DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
  53.  
  54.      _SSSS_EEEE_TTTT_UUUU_PPPP          Moves active accounting files into a work directory.
  55.  
  56.      _VVVV_EEEE_RRRR_IIII_FFFF_YYYY         Verifies the integrity of the data files.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ccccssssaaaarrrruuuunnnn((((1111MMMM))))                                                          ccccssssaaaarrrruuuunnnn((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      _AAAA_RRRR_CCCC_HHHH_IIII_VVVV_EEEE_1111       User exit that executes a site-generated accounting script
  75.                     to archive the accounting files.
  76.  
  77.      _BBBB_UUUU_IIII_LLLL_DDDD          Organizes the accounting data into a _ssss_oooo_rrrr_tttt_eeee_dddd _pppp_aaaa_cccc_cccc_tttt file.
  78.  
  79.      _AAAA_RRRR_CCCC_HHHH_IIII_VVVV_EEEE_2222       User exit that executes a site-generated accounting script
  80.                     to archive the _ssss_oooo_rrrr_tttt_eeee_dddd _pppp_aaaa_cccc_cccc_tttt file.
  81.  
  82.      _CCCC_MMMM_SSSS            Generates command summaries.
  83.  
  84.      _RRRR_EEEE_PPPP_OOOO_RRRR_TTTT         Generates daily accounting reports.
  85.  
  86.      _DDDD_RRRR_EEEE_PPPP           Generates daemon usage report.
  87.  
  88.      _FFFF_EEEE_FFFF            User exit that executes a site-generated accounting script
  89.                     to format the _ssss_oooo_rrrr_tttt_eeee_dddd _pppp_aaaa_cccc_cccc_tttt file into a format that is
  90.                     suitable for use on a front end.
  91.  
  92.      _UUUU_SSSS_EEEE_RRRR_EEEE_XXXX_IIII_TTTT       User exit that executes a site-generated accounting
  93.                     script.
  94.  
  95.      _CCCC_LLLL_EEEE_AAAA_NNNN_UUUU_PPPP        Cleans up temporary files and exits.
  96.  
  97.      Before restarting _cccc_ssss_aaaa_rrrr_uuuu_nnnn after a failure, check the _aaaa_cccc_tttt_iiii_vvvv_eeee file for
  98.      diagnostics, then fix any corrupted _p_a_c_c_t files.  The lock files must be
  99.      removed before _cccc_ssss_aaaa_rrrr_uuuu_nnnn can be restarted.  If _cccc_ssss_aaaa_rrrr_uuuu_nnnn is restarted, you must
  100.      specify the _M_M_D_D operand, which specifies the month and day for which
  101.      _cccc_ssss_aaaa_rrrr_uuuu_nnnn will rerun the accounting.  The entry point for processing is
  102.      based on the contents of _ssss_tttt_aaaa_tttt_eeee_ffff_iiii_llll_eeee.  To override this entry point,
  103.      include the desired state on the command line to designate where
  104.      processing should begin.
  105.  
  106. NNNNOOOOTTTTEEEESSSS
  107.      The mail recipients (_rrrr_oooo_oooo_tttt and _aaaa_dddd_mmmm) can be changed by modifying the
  108.      _MMMM_AAAA_IIII_LLLL______LLLL_IIII_SSSS_TTTT  and _WWWW_MMMM_AAAA_IIII_LLLL______LLLL_IIII_SSSS_TTTT parameters in the _////_eeee_tttt_cccc_////_cccc_ssss_aaaa_...._cccc_oooo_nnnn_ffff file.  You also
  109.      can change the other parameters defined in the accounting configuration
  110.      file for your site.
  111.  
  112.      _cccc_ssss_aaaa_rrrr_uuuu_nnnn checks the number of free blocks in the filesystem that contains
  113.      the accounting files to ensure that it consists of more than 2000 blocks.
  114.      Block size is 1024 bytes.  By default, _cccc_ssss_aaaa_rrrr_uuuu_nnnn assumes that the filesystem
  115.      is _////_vvvv_aaaa_rrrr; if this is not the case, change symbol _AAAA_CCCC_CCCC_TTTT______FFFF_SSSS in _////_eeee_tttt_cccc_////_cccc_ssss_aaaa_...._cccc_oooo_nnnn_ffff
  116.      accordingly.  To change the minimum number of free blocks on _AAAA_CCCC_CCCC_TTTT______FFFF_SSSS (the
  117.      default is 2000), modify _MMMM_IIII_NNNN______BBBB_LLLL_KKKK_SSSS in the configuration file.
  118.  
  119.      To remove bad records in accounting data files encountered by _cccc_ssss_aaaa_rrrr_uuuu_nnnn, use
  120.      _cccc_ssss_aaaa_eeee_dddd_iiii_tttt(1M) and _cccc_ssss_aaaa_vvvv_eeee_rrrr_iiii_ffff_yyyy(1M).
  121.  
  122.      You need to make sure that _cccc_ssss_aaaa_rrrr_uuuu_nnnn can read the site-generated user exit
  123.      scripts.  If _cccc_ssss_aaaa_rrrr_uuuu_nnnn cannot read the scripts, it does not handle the error
  124.      graciously like it does for other errors.  This means the error will not
  125.      be logged in the SYSLOG file and the active file, and no notification
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ccccssssaaaarrrruuuunnnn((((1111MMMM))))                                                          ccccssssaaaarrrruuuunnnn((((1111MMMM))))
  137.  
  138.  
  139.  
  140.      email will be sent out.
  141.  
  142. BBBBUUUUGGGGSSSS
  143.      If possible, do not restart _cccc_ssss_aaaa_rrrr_uuuu_nnnn in the SETUP state.  Instead, run
  144.      SETUP manually and restart _cccc_ssss_aaaa_rrrr_uuuu_nnnn by using the following command line:
  145.  
  146.           _cccc_ssss_aaaa_rrrr_uuuu_nnnn _M_M_D_D _h_h_m_m VERIFY
  147.  
  148.      If _cccc_ssss_aaaa_rrrr_uuuu_nnnn terminates abnormally and leaves the lock files in place, the
  149.      next execution of _cccc_ssss_aaaa_rrrr_uuuu_nnnn will remove these locks, but it also will
  150.      terminate abnormally.
  151.  
  152. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  153.      Example 1:  The following example shows how to start _cccc_ssss_aaaa_rrrr_uuuu_nnnn:
  154.  
  155.           _nnnn_oooo_hhhh_uuuu_pppp _cccc_ssss_aaaa_rrrr_uuuu_nnnn _2222_>>>> _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_aaaa_cccc_cccc_tttt_////_nnnn_iiii_tttt_eeee_////_cccc_ssss_aaaa_////_ffff_dddd_2222_llll_oooo_gggg _&&&&
  156.  
  157.      Example 2:  The following example shows how to restart _cccc_ssss_aaaa_rrrr_uuuu_nnnn at the
  158.      state specified in _ssss_tttt_aaaa_tttt_eeee_ffff_iiii_llll_eeee:
  159.  
  160.           _nnnn_oooo_hhhh_uuuu_pppp _cccc_ssss_aaaa_rrrr_uuuu_nnnn _0000_6666_0000_1111 _1111_3333_4444_5555 _2222_>>>>_>>>> _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_aaaa_cccc_cccc_tttt_////_nnnn_iiii_tttt_eeee_////_cccc_ssss_aaaa_////_ffff_dddd_2222_llll_oooo_gggg _&&&&
  161.  
  162.      Example 3:  The following example shows how to restart _cccc_ssss_aaaa_rrrr_uuuu_nnnn at a
  163.      specific state:
  164.  
  165.           _nnnn_oooo_hhhh_uuuu_pppp _cccc_ssss_aaaa_rrrr_uuuu_nnnn _0000_6666_0000_1111 _1111_3333_4444_5555 _BBBB_UUUU_IIII_LLLL_DDDD _2222_>>>>_>>>> _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_aaaa_cccc_cccc_tttt_////_nnnn_iiii_tttt_eeee_////_cccc_ssss_aaaa_////_ffff_dddd_2222_llll_oooo_gggg _&&&&
  166.  
  167. FFFFIIIILLLLEEEESSSS
  168.      _////_eeee_tttt_cccc_////_cccc_ssss_aaaa_...._cccc_oooo_nnnn_ffff                      Accounting configuration file
  169.  
  170.      _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_aaaa_cccc_cccc_tttt_////_dddd_aaaa_yyyy_////_****                Directory that contains current
  171.                                         accounting files
  172.  
  173.      _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_aaaa_cccc_cccc_tttt_////_nnnn_iiii_tttt_eeee_////_cccc_ssss_aaaa_////_aaaa_cccc_tttt_iiii_vvvv_eeee      Record of accounting progress
  174.  
  175.      _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_aaaa_cccc_cccc_tttt_////_nnnn_iiii_tttt_eeee_////_cccc_ssss_aaaa_////_cccc_llll_aaaa_ssss_tttt_dddd_aaaa_tttt_eeee   Record of last date and time that
  176.                                         accounting ran
  177.  
  178.      _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_aaaa_cccc_cccc_tttt_////_nnnn_iiii_tttt_eeee_////_cccc_ssss_aaaa_////_llll_oooo_cccc_kkkk        Lock file that prevents simultaneous
  179.                                         invocation
  180.  
  181.      _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_aaaa_cccc_cccc_tttt_////_nnnn_iiii_tttt_eeee_////_cccc_ssss_aaaa_////_llll_oooo_cccc_kkkk_1111       Lock file that prevents simultaneous
  182.                                         invocation
  183.  
  184.      _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_aaaa_cccc_cccc_tttt_////_nnnn_iiii_tttt_eeee_////_cccc_ssss_aaaa_////_ssss_tttt_aaaa_tttt_eeee_ffff_iiii_llll_eeee   Record of last state that _cccc_ssss_aaaa_rrrr_uuuu_nnnn was
  185.                                         working on or completed
  186.  
  187.      _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_aaaa_cccc_cccc_tttt_////_ssss_uuuu_mmmm_////_cccc_ssss_aaaa_////_****            Directory that contains daily
  188.                                         condensed data files and accounting
  189.                                         reports
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ccccssssaaaarrrruuuunnnn((((1111MMMM))))                                                          ccccssssaaaarrrruuuunnnn((((1111MMMM))))
  203.  
  204.  
  205.  
  206.      _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_aaaa_cccc_cccc_tttt_////_wwww_oooo_rrrr_kkkk_////_****               Directory that contains temporary
  207.                                         files from daily accounting
  208.  
  209.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_aaaa_cccc_cccc_tttt_////_cccc_ssss_aaaa_...._aaaa_rrrr_cccc_hhhh_iiii_vvvv_eeee_1111         Site-generated user exit script to be
  210.                                         executed during the _AAAA_RRRR_CCCC_HHHH_IIII_VVVV_EEEE_1111 state.
  211.  
  212.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_aaaa_cccc_cccc_tttt_////_cccc_ssss_aaaa_...._aaaa_rrrr_cccc_hhhh_iiii_vvvv_eeee_2222         Site-generated user exit script to be
  213.                                         executed during the _AAAA_RRRR_CCCC_HHHH_IIII_VVVV_EEEE_2222 state.
  214.  
  215.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_aaaa_cccc_cccc_tttt_////_cccc_ssss_aaaa_...._ffff_eeee_ffff              Site-generated user exit script to be
  216.                                         executed during the _FFFF_EEEE_FFFF state.
  217.  
  218.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_aaaa_cccc_cccc_tttt_////_cccc_ssss_aaaa_...._uuuu_ssss_eeee_rrrr             Site-generated user exit script to be
  219.                                         executed during the _UUUU_SSSS_EEEE_RRRR_EEEE_XXXX_IIII_TTTT state.
  220.  
  221. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  222.      cron(1M), csaaddc(1M), csabuild(1M), csacms(1M), csacon(1M), csacrep(1M),
  223.      csadrep(1M), csaedit(1M), csajrep(1M), csaperiod(1M), csarecy(1M),
  224.      csaverify(1M), acctctl(3c).
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.